package top.jojoace.demo.Dao;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

/**
 * @author 陈Ser
 * @ClassName User2
 * @description: TODO
 * @Date 2021/10/27 18:56
 * @Version 1.0
 */
//@AllArgsConstructor
@AllArgsConstructor
@ToString
@Setter
@Getter
@Repository
@Lazy   //延迟实例化
public class User2 implements UserInterface{

    private String name;
    private int age;

    public User2(){
        System.out.println("Constructor User2...");
    }


    @Override
    public void sayClass() {
        System.out.println("Constructor User2...");
    }
}
